2025-01-30 01:35:58,562 - INFO - Num classes: 4
2025-01-30 02:04:00,273 - INFO - Class weights: tensor([0.3543, 7.1414, 2.3026, 1.6574], device='cuda:0')
2025-01-30 02:04:02,078 - INFO - Model architecture:
CombinedModel(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1024, 8, kernel_size=(5, 5), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(5, 5), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 4, kernel_size=(6, 6), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(4, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(4, 4, kernel_size=(6, 6), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(4, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(4, 4, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1024, out_features=64, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=64, out_features=1024, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1024, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=4, bias=True)
    )
    (logistic): Linear(in_features=4, out_features=4, bias=True)
  )
  (mlp): Sequential(
    (0): Linear(in_features=8, out_features=256, bias=True)
    (1): ReLU(inplace=True)
    (2): BatchNorm1d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout(p=0.2, inplace=False)
    (4): Linear(in_features=256, out_features=128, bias=True)
    (5): ReLU(inplace=True)
    (6): BatchNorm1d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout(p=0.2, inplace=False)
    (8): Linear(in_features=128, out_features=4, bias=True)
  )
)
2025-01-30 02:04:02,079 - INFO - Using cuda device
2025-01-30 02:43:36,669 - INFO - Epoch: 0/100. Training time: 1939.801
2025-01-30 02:43:36,693 - INFO - Training Metrics...
2025-01-30 02:43:36,693 - INFO - {'loss': 0.553532017716046, 'f1': 60.3079866457269, 'acc': 68.5409554359033, 'precision': 58.3422999497968, 'recall': 78.99890515184197, 'balanced acc': 78.99890515184197}
2025-01-30 02:43:36,693 - INFO - Validation Metrics... Inference time: 434.788
2025-01-30 02:43:36,693 - INFO - {'loss': 0.5539612501275306, 'f1': 70.33721360834126, 'acc': 83.76641586867306, 'precision': 65.83822542236625, 'recall': 82.87455319429394, 'balanced acc': 82.87455319429394}
2025-01-30 02:43:36,693 - INFO - ==================================================
2025-01-30 05:33:01,390 - INFO - Epoch: 5/100. Training time: 1590.710
2025-01-30 05:33:01,409 - INFO - Training Metrics...
2025-01-30 05:33:01,410 - INFO - {'loss': 0.3128472926287815, 'f1': 76.02954410232067, 'acc': 87.12478997212354, 'precision': 72.18036190207235, 'recall': 88.48911061620798, 'balanced acc': 88.48911061620798}
2025-01-30 05:33:01,410 - INFO - Validation Metrics... Inference time: 402.863
2025-01-30 05:33:01,410 - INFO - {'loss': 0.38348158200581867, 'f1': 74.57017330850144, 'acc': 88.07069843441253, 'precision': 71.70654948650514, 'recall': 83.84120124376608, 'balanced acc': 83.84120124376608}
2025-01-30 05:33:01,410 - INFO - ==================================================
2025-01-30 08:18:35,666 - INFO - Epoch: 10/100. Training time: 1566.459
2025-01-30 08:18:35,692 - INFO - Training Metrics...
2025-01-30 08:18:35,693 - INFO - {'loss': 0.29774847516578995, 'f1': 77.40685666793385, 'acc': 87.70602780005345, 'precision': 73.41790234167756, 'recall': 88.62353126635153, 'balanced acc': 88.62353126635153}
2025-01-30 08:18:35,693 - INFO - Validation Metrics... Inference time: 404.020
2025-01-30 08:18:35,693 - INFO - {'loss': 0.33696676410880744, 'f1': 75.81757415476449, 'acc': 89.43338653290775, 'precision': 72.56668847922883, 'recall': 83.89858638381767, 'balanced acc': 83.89858638381767}
2025-01-30 08:18:35,693 - INFO - ==================================================
2025-01-30 11:12:36,922 - INFO - Epoch: 15/100. Training time: 1642.722
2025-01-30 11:12:36,935 - INFO - Training Metrics...
2025-01-30 11:12:36,935 - INFO - {'loss': 0.2948880611088476, 'f1': 76.37932411306468, 'acc': 87.16266181693206, 'precision': 72.27396679960924, 'recall': 88.34730188897225, 'balanced acc': 88.34730188897225}
2025-01-30 11:12:36,935 - INFO - Validation Metrics... Inference time: 420.561
2025-01-30 11:12:36,935 - INFO - {'loss': 0.3262178868639703, 'f1': 75.35310414654471, 'acc': 89.11130110959112, 'precision': 71.95212607924604, 'recall': 83.58793992284482, 'balanced acc': 83.58793992284482}
2025-01-30 11:12:36,935 - INFO - ==================================================
2025-01-30 14:06:45,583 - INFO - Epoch: 20/100. Training time: 1673.062
2025-01-30 14:06:45,601 - INFO - Training Metrics...
2025-01-30 14:06:45,601 - INFO - {'loss': 0.2867116132393259, 'f1': 76.33634620338873, 'acc': 87.17029442089589, 'precision': 71.96339756332844, 'recall': 88.65054386728468, 'balanced acc': 88.65054386728468}
2025-01-30 14:06:45,601 - INFO - Validation Metrics... Inference time: 425.353
2025-01-30 14:06:45,601 - INFO - {'loss': 0.3159783342305352, 'f1': 75.40588373096145, 'acc': 89.06763945888434, 'precision': 72.47259856346298, 'recall': 83.76427639576436, 'balanced acc': 83.76427639576436}
2025-01-30 14:06:45,601 - INFO - ==================================================
2025-01-30 17:05:49,256 - INFO - Epoch: 25/100. Training time: 1717.672
2025-01-30 17:05:49,276 - INFO - Training Metrics...
2025-01-30 17:05:49,276 - INFO - {'loss': 0.28828171497495303, 'f1': 77.25079221041057, 'acc': 88.0659392064765, 'precision': 73.49365210423045, 'recall': 88.19542189761941, 'balanced acc': 88.19542189761941}
2025-01-30 17:05:49,276 - INFO - Validation Metrics... Inference time: 432.096
2025-01-30 17:05:49,276 - INFO - {'loss': 0.32576727691818685, 'f1': 74.8870762331282, 'acc': 88.58853929168566, 'precision': 71.60062254526603, 'recall': 83.84707717641997, 'balanced acc': 83.84707717641997}
2025-01-30 17:05:49,277 - INFO - ==================================================
2025-01-30 19:59:22,247 - INFO - Epoch: 30/100. Training time: 1634.303
2025-01-30 19:59:22,262 - INFO - Training Metrics...
2025-01-30 19:59:22,262 - INFO - {'loss': 0.278907634427982, 'f1': 77.07679100369265, 'acc': 87.15153511284227, 'precision': 72.75357544799219, 'recall': 89.40451401258387, 'balanced acc': 89.40451401258387}
2025-01-30 19:59:22,263 - INFO - Validation Metrics... Inference time: 414.053
2025-01-30 19:59:22,263 - INFO - {'loss': 0.32825180420688554, 'f1': 74.75214636985132, 'acc': 88.33937528499771, 'precision': 71.52240033296304, 'recall': 84.1532755914981, 'balanced acc': 84.1532755914981}
2025-01-30 19:59:22,263 - INFO - ==================================================
2025-01-30 22:55:34,168 - INFO - Epoch: 35/100. Training time: 1691.292
2025-01-30 22:55:34,192 - INFO - Training Metrics...
2025-01-30 22:55:34,192 - INFO - {'loss': 0.28038312208476324, 'f1': 76.99848276433315, 'acc': 87.44169817084813, 'precision': 72.88614997555591, 'recall': 89.06826998993722, 'balanced acc': 89.06826998993722}
2025-01-30 22:55:34,193 - INFO - Validation Metrics... Inference time: 424.679
2025-01-30 22:55:34,193 - INFO - {'loss': 0.3290628627234814, 'f1': 74.90989808608334, 'acc': 88.44123347013225, 'precision': 71.7256090285465, 'recall': 84.22502227680741, 'balanced acc': 84.22502227680741}
2025-01-30 22:55:34,193 - INFO - ==================================================
2025-01-31 01:55:15,203 - INFO - Epoch: 40/100. Training time: 1718.406
2025-01-31 01:55:15,274 - INFO - Training Metrics...
2025-01-31 01:55:15,275 - INFO - {'loss': 0.28696765600166885, 'f1': 76.5547163440474, 'acc': 87.95708748615725, 'precision': 72.33793290212688, 'recall': 87.90151165609069, 'balanced acc': 87.90151165609069}
2025-01-31 01:55:15,275 - INFO - Validation Metrics... Inference time: 431.459
2025-01-31 01:55:15,275 - INFO - {'loss': 0.3217182699956146, 'f1': 74.81494684870175, 'acc': 88.39810381516948, 'precision': 71.81557529344772, 'recall': 83.99839610080573, 'balanced acc': 83.99839610080573}
2025-01-31 01:55:15,275 - INFO - ==================================================
2025-01-31 04:44:52,376 - INFO - Epoch: 45/100. Training time: 1593.452
2025-01-31 04:44:52,394 - INFO - Training Metrics...
2025-01-31 04:44:52,394 - INFO - {'loss': 0.2734866918895045, 'f1': 78.08114465974545, 'acc': 88.04053538015046, 'precision': 73.67005984055282, 'recall': 89.22773568294922, 'balanced acc': 89.22773568294922}
2025-01-31 04:44:52,394 - INFO - Validation Metrics... Inference time: 403.461
2025-01-31 04:44:52,394 - INFO - {'loss': 0.3167447865593667, 'f1': 75.12867633532811, 'acc': 88.69442544459645, 'precision': 72.10425423542853, 'recall': 84.1087767358488, 'balanced acc': 84.1087767358488}
2025-01-31 04:44:52,394 - INFO - ==================================================
2025-01-31 06:57:06,961 - INFO - Early stopping criterion met. Stopping training.
2025-01-31 07:03:52,653 - INFO - Final test metrics:
{'f1': 78.84016201928483, 'acc': 89.60031919744642, 'precision': 75.2512560773677, 'recall': 87.34399605423965, 'balanced acc': 87.34399605423965}
